Repository navigation
Conversation
Why:
Each value inclusion check stored both full value descriptions (type,
attributes, doc comments) in the .cmt, a fifth of the stdlib's .cmt
bytes. Reanalyze, the only reader, uses the two locations and whether
both types take optional arguments; the compiler now records just that.
Review: Does reanalyze still see the same optional-argument references?
Yes: the flag is computed with the same check on the same two types, the
deadcode snapshots are unchanged, and forcing the flag off adds three
findings to them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gLMbg8G3FeSq6sPLM2
Signed-off-by: Christoph Knittel <ck@cca.io>
Why:
Eight cmt_infos fields came from OCaml and had no reader: the comments
(always empty), the command line, source file, build directory, load
path, initial environment, imports and the use_summaries flag.
Dropping them and the OCAML_BINANNOT_WITHENV switch (which kept full
environments in the typed tree) leaves the module name, the typed
tree, the value dependencies, the source digest (rescript-tools
migrate) and the deprecation uses. The runtime's .cmt and .cmti files
get 3% smaller.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gLMbg8G3FeSq6sPLM2
Signed-off-by: Christoph Knittel <ck@cca.io>
Why:
Every environment extension also prepended a summary node (a log of
the bindings and opens that built it), and .cmt files kept these logs
in every environment of the typed tree. OCaml tools replay them with
Envaux to rebuild an environment; this compiler has no Envaux and no
tool reads them. The environments stored in .cmt files now keep only
their GADT local constraints and flags, and the runtime's .cmt and
.cmti files get 7% smaller.
Review: Do reanalyze and gentype lose anything? No: they only look types
and modules up in typed-tree environments, and the tables those lookups
read were already empty in .cmt files.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kbf3gLMbg8G3FeSq6sPLM2
Signed-off-by: Christoph Knittel <ck@cca.io>
Changelog🏠 Internal
Semantic Diff3 commits · Full page Record value dependencies in .cmt files as two locations and a flagbc2f41b · cknitt + Claude · Nov 06, 2026, 21:06 UTC
Review
Stop writing .cmt fields that no tool reads5a289d9 · cknitt + Claude · Nov 06, 2026, 21:10 UTC
Remove environment summaries14fa937 · cknitt + Claude · Nov 06, 2026, 21:12 UTC
Review
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9252 +/- ##
=======================================
Coverage 81.74% 81.74%
=======================================
Files 457 457
Lines 65713 65708 -5
=======================================
- Hits 53715 53711 -4
+ Misses 11998 11997 -1
🚀 New features to boost your workflow:
|
rescript
@rescript/belt
@rescript/darwin-arm64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
|
Developer playground preview: https://rescript-lang.github.io/rescript/dev-playground/?version=pr-9252 |
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Drops data that no tool reads from
.cmt/.cmtifiles. Follow-up to the artifact-size findings in #9148.Types.value_descriptions (type, attributes, doc comments). Reanalyze, the only reader, uses the two locations and whether both types take optional arguments, so that's all the compiler records now. The flag is decided when the.cmtis written, as before, when the types were marshalled at that point.cmt_infosfields removed.cmt_comments(always empty),cmt_args,cmt_sourcefile,cmt_builddir,cmt_loadpath,cmt_initial_env,cmt_importsandcmt_use_summarieswere write-only. TheOCAML_BINANNOT_WITHENVswitch is removed as well. What's left: module name, typed tree, value dependencies, source digest (rescript-tools migrate) and deprecation uses.Env.summaryremoved. Every env extension prepended a summary node, and.cmtfiles kept these logs in every typed-tree environment. OCaml tools replay them throughEnvaux, which this compiler doesn't have. The envs stored in.cmtfiles now keep only their GADT local constraints and flags. Reanalyze and gentype only look things up in those envs, and those lookups read tables that were already empty in.cmtfiles.Runtime artifacts, master → this PR:
.cmttotal.cmtitotalStdlib_Array.cmt.cmifiles are unchanged. On 54 Belt andtests/testsfiles, the generated JS is byte-identical and allocation is 0.2% lower.No magic-number bump, per
compiler/AGENTS.md.🤖 Generated with Claude Code
https://claude.ai/code/session_01Kbf3gLMbg8G3FeSq6sPLM2